//package org.jeecg.modules.activiti.listener;
//
//import org.activiti.engine.delegate.DelegateExecution;
//import org.activiti.engine.delegate.ExecutionListener;
//import org.jeecg.common.util.SpringContextUtils;
//import org.jeecg.modules.activiti.entity.ActBusiness;
//import org.jeecg.modules.activiti.service.Impl.ActBusinessServiceImpl;
//import org.jeecg.modules.zcgl.entity.AssetFixedLog;
//import org.jeecg.modules.zcgl.service.IAssetFixedLogService;
//import org.springframework.stereotype.Component;
//
///**
// * 固定资产归还表单审批后监听
// */
//@Component
//public class AssetFixedReturnModifyListener implements ExecutionListener {
//
//
//    ActBusinessServiceImpl actBusinessService;
//    private IAssetFixedLogService assetFixedLogService;
//
//    public void notify(DelegateExecution execution) throws Exception {
//        if (assetFixedLogService == null) {
//            assetFixedLogService = (IAssetFixedLogService) SpringContextUtils.getBean("assetFixedLogServiceImpl");
//        }
//        if (actBusinessService == null) {
//            actBusinessService = (ActBusinessServiceImpl) SpringContextUtils.getBean("actBusinessServiceImpl");
//        }
//        String eventName = execution.getEventName();
//        //start
//        if (EVENTNAME_START.equals(eventName)) {
//        } else if (EVENTNAME_END.equals(eventName)) {
//            ActBusiness actBusiness = actBusinessService.getById(execution.getProcessBusinessKey());
//            if (actBusiness != null && "zcgl_asset_fixed_log".equalsIgnoreCase(actBusiness.getTableName())) {
//                AssetFixedLog assetFixedLog = assetFixedLogService.getById(actBusiness.getTableId());
//                if(assetFixedLog !=null){
//                    assetFixedLogService.returnAsset(assetFixedLog);
//                }
//            }
//        }
//
//
//    }
//}
